﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;


namespace IHISCETeim.Web.MachineSys.XZModel
{
    public partial class XZTrainListDetail : PageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.查看 };
            }
        }
        protected override string DWZRef
        {
            get
            {
                return "XZTrainList";
            }
        }


        protected string TrainDept
        {
            get
            {
                return GetRequestValue<string>("TrainDept", "-1");
            }
        }



        protected string GetSqlWhere()
        {
            if (TrainDept!="-1")
            {
                return string.Format(" TrainDept='{0}'", TrainDept);
            }
            return "";
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            DataBind();
            this.AddLog(Permission.查看, "");
        }

        protected void DataBind()
        {

            this.rpMenu.DataSource = XZJobTrainController.GetAllXZTrainList(GetSqlWhere());
            this.rpMenu.DataBind();
        }
    }
}